// 查询指定用户已分配中台角色
const wandGetUserSystemRoles = {
    uri: '/auth-center/sys/role/getUserSysRoles',
    queries: {
        userId: true
    },
    method: 'get',
    message: false,
    data: null,
    options: {
        allowDupRequest: true
    }
}

// 查询中台角色列表
const wandGetUserRolesList = {
    uri: '/auth-center/sys/role/listSysRolesWithAllotPage',
    queries: null,
    method: 'post',
    message: false,
    data: {
        userId: false,
        pageIndex: false,
        pageSize: false,
        clientChannelCode: false,
        keyword: false,
        enabled: false
    },
    options: {
        // requestFreezingTime: 400,
        allowDupRequest: true
    }
}

// 分配中台角色
const wandAssignRoles = {
    uri: '/auth-center/sys/role/allotSysRolesForUser',
    queries: null,
    method: 'post',
    message: false,
    data: {
        userId: true,
        roleIds: false
    }
}

 // 角色列表
const wandRoleList = {
    uri: '/auth-center/sys/role/list',
    queries: null,
    method: 'post',
    message: false,
    data: {
        clientChannelCode: false,
        id: false,
        keyword: false,
        enabled: false,
        comments: false,
        roleCode: false,
        roleName: false,
        pageIndex: false,
        pageSize: false
    },
    options: {
        allowDupRequest: true
    }
}

// 添加角色
const wandAddRole = {
    uri: '/auth-center/sys/role/create',
    queries: null,
    method: 'post',
    message: false,
    data: {
        clientChannelCode: false,
        id: false,
        enabled: false,
        comments: false,
        roleCode: true,
        roleName: true
    }
}

// 编辑角色
const wandEditRole = {
    uri: '/auth-center/sys/role/update',
    queries: null,
    method: 'post',
    message: false,
    data: {
        clientChannelCode: false,
        id: false,
        enabled: false,
        comments: false,
        roleCode: true,
        roleName: true
    }
}

// 删除角色
const wandDelRole = {
    uri: '/auth-center/sys/role/deleteSysRole',
    queries: null,
    method: 'post',
    message: false,
    data: {
        id: true
    }
}

// 启用/禁用角色
const wandEnableRole = {
    uri: '/auth-center/sys/role/updateRoleEnable',
    queries: null,
    method: 'post',
    message: false,
    data: {
        clientChannelCode: false,
        id: false,
        enabled: false,
        comments: false,
        roleCode: false,
        roleName: false
    },
    options: {
        allowDupRequest: true
    }
}

//  查询角色已分配资源ID集合
const wandGetRolePermissions = {
    uri: '/auth-center/sys/role/getRolePermissionList',
    queries: null,
    method: 'post',
    message: false,
    data: {
        roleId: false
    },
    options: {
        allowDupRequest: true
    }
}

// 查询(睿云中台)资源树
const wandGetPermissionsList = {
    uri: '/auth-center/sys/querySysPermission',
    queries: null,
    method: 'post',
    message: false,
    data: {
        sys: false
    },
    options: {
        allowDupRequest: true
    }
}
// 分配权限
const wandAssignPermission = {
    uri: '/auth-center/sys/role/changeRolePermission',
    queries: null,
    method: 'post',
    message: false,
    data: {
        authorizeType: false,
        permissionId: false,
        roleId: false
    },
    options: {
        allowDupRequest: true,
        requestFreezingTime: 0
    }
}

// 用户信息
const getCurrentUser = {
    uri: '/auth-center/sys/getUserInfoWithRole',
    type: 'HttpPortal',
    method: 'post',
    queries: null,
    data: null
}

// 获取用户菜单
const listUserMenus = {
    uri: '/auth-center/sys/listUserMenus',
    type: 'HttpPortal',
    method: 'post',
    queries: null,
    data: null
}

// 角色列表
const frontRoleList = {
    uri: '/auth-center/roleTemplate/listPage',
    queries: null,
    method: 'post',
    message: false,
    data: {
        gmtCreateGt: false,
        gmtCreateLt: false,
        enabled: false,
        roleCode: false,
        roleName: false,
        pageIndex: false,
        pageSize: false
    },
    options: {
        allowDupRequest: true
    }
}

// 添加角色
const frontAddRole = {
    uri: '/auth-center/roleTemplate/create',
    queries: null,
    method: 'post',
    message: false,
    data: {
        enabled: false,
        comments: false,
        roleCode: false,
        roleName: false,
        sceneKeys: false
    }
}

// 编辑角色
const frontEditRole = {
    uri: '/auth-center/roleTemplate/update',
    queries: null,
    method: 'post',
    message: false,
    data: {
        id: false,
        enabled: false,
        comments: false,
        roleCode: false,
        roleName: false,
        sceneKeys: false
    }
}

// 删除角色
const frontDelRole ={
    uri: '/auth-center/roleTemplate/delete',
    queries: null,
    method: 'post',
    message: false,
    data: {
        id: false
    }
}

// 启用/禁用角色
const frontEnableRole = {
    uri: '/auth-center/roleTemplate/updateEnable',
    queries: null,
    method: 'post',
    message: false,
    data: {
        id: false,
        enabled: false
    },
    options: {
        allowDupRequest: true
    }
}

//  查询角色已分配资源ID集合
const frontGetRolePermissions = {
    uri: '/auth-center/roleTemplatePermission/getRolePermissionIdList',
    queries: {
        roleId: false
    },
    method: 'get',
    message: false,
    data: null,
    options: {
        allowDupRequest: true
    }
}
// 查询(睿云中台)前台资源树
const frontGetPermissionsList = {
    uri: '/auth-center/sys/queryScenePermission',
    queries: null,
    method: 'post',
    message: false,
    data: {
        roleCode: true
    },
    options: {
        allowDupRequest: true
    }
}
// 分配权限
const frontAssignPermission = {
    uri: '/auth-center/roleTemplatePermission/changeRolePermission',
    queries: null,
    method: 'post',
    message: false,
    data: {
        authorizeType: false,
        permissionId: false,
        roleId: false,
        sceneKey: false
    },
    options: {
        allowDupRequest: true,
        requestFreezingTime: 0
    }
}

// 查询中台的所有菜单权限
const getWandBtnPermission = {
    uri: '/auth-center/sys/getUserRyButtonPermission',
    queries: null,
    method: 'post',
    message: false,
    data: null
}
// 场景列表
const frontSceneList = {
    uri: '/auth-center/sys/scene/listPage',
    queries: null,
    method: 'post',
    message: false,
    data: {
        rowStart: false,
        sceneKey: false,
        sceneName: false,
        pageIndex: false,
        pageSize: false
    },
    options: {
        allowDupRequest: true
    }
}
// 添加场景
const frontAddScene = {
    uri: '/auth-center/sys/scene/create',
    queries: null,
    method: 'post',
    message: false,
    data: {
        comment: false,
        sceneKey: true,
        sceneName: true
    }
}

// 编辑场景
const frontEditScene = {
    uri: '/auth-center/sys/scene/update',
    queries: null,
    method: 'post',
    message: false,
    data: {
        id: true,
        comment: false,
        sceneName: true
    }
}

// 删除场景
const frontDelScene ={
    uri: '/auth-center/sys/scene/delete',
    queries: null,
    method: 'post',
    message: false,
    data: {
        id: true
    }
}
// 分配场景资源
const frontAssignScenePermission = {
    uri: '/auth-center/sys/scene/changeScenePermission',
    queries: null,
    method: 'post',
    message: false,
    data: {
        authorizeType: false,
        permissionId: true,
        sceneKey: true
    },
    options: {
        allowDupRequest: true,
        requestFreezingTime: 0
    }
}
//  查询场景已分配资源ID集合
const frontGetScenePermissions = {
    uri: '/auth-center/sys/scene/getScenePermissionIdList',
    queries: {
        sceneKey: true
    },
    method: 'get',
    message: false,
    data: null,
    options: {
        allowDupRequest: true
    }
}
// 查询(睿云中台)前台资源树
const frontGetScenePermissionsList = {
    uri: '/auth-center/sys/permission/list',
    queries: null,
    method: 'post',
    message: false,
    data: null,
    options: {
        allowDupRequest: true
    }
}

export default {
    wandGetUserSystemRoles,
    wandGetUserRolesList,
    wandAssignRoles,
    wandRoleList,
    wandAddRole,
    wandEditRole,
    wandDelRole,
    wandEnableRole,
    wandGetRolePermissions,
    wandGetPermissionsList,
    wandAssignPermission,
    getCurrentUser,
    listUserMenus,
    frontRoleList,
    frontAddRole,
    frontEditRole,
    frontDelRole,
    frontEnableRole,
    frontGetRolePermissions,
    frontGetPermissionsList,
    frontAssignPermission,
    getWandBtnPermission,
    frontSceneList,
    frontAddScene,
    frontEditScene,
    frontDelScene,
    frontAssignScenePermission,
    frontGetScenePermissions,
    frontGetScenePermissionsList
};